#include <gtest/gtest.h>
#include "core/http/http_helper.h"
#include "core/http/http_response.h"

using namespace aliyun;

TEST(core_http, HttpHelper) {
	#if 0
  HttpResponse *response;
  size_t body_length = 0;
  response = HttpHelper::GetResponse("http://ecs.aliyuncs.com");
  ASSERT_NE(response, ((void*)0));
  ASSERT_EQ(response->GetStatus(), 400);
  ASSERT_NE(response->GetBody(body_length), ((void*)0));
  ASSERT_GT(body_length, (size_t)0);
  HttpHelper::ReleaseResponse(response);


  response = HttpHelper::GetResponse("https://ecs.aliyuncs.com");
  ASSERT_NE(response, ((void*)0));
  ASSERT_EQ(response->GetStatus(), 400);
  ASSERT_NE(response->GetBody(body_length), ((void*)0));
  ASSERT_GT(body_length, (size_t)0);
  HttpHelper::ReleaseResponse(response);
  	#endif
}


// end of file
